package com.deyuanyun.pic.insp.enumeration;

public enum TaskManagerEnum {
	status1("1","未发布"),
	status2("2","已发布"),
	status3("3","进行中"),
	status4("4","已完成");
	
	private String code;
    private String value;
    
    private TaskManagerEnum(String code,String value){
    	this.code = code;
    	this.value = value;
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static TaskManagerEnum getByCode(String code){
		TaskManagerEnum[] enumConstants = TaskManagerEnum.class.getEnumConstants(); 
		for(TaskManagerEnum  enumItem:enumConstants){
			if(enumItem.getCode().equalsIgnoreCase(code)){
				return enumItem;
			}
		}
		return null;
	}
}
